<?php
// +-------------------------
// | 视图驱动类
// +-------------------------
namespace Framework\Core;
class VIEW {
	
	public static $viewObj;

	public static function init($configArr) {

		$viewType = current($configArr);

		self::$viewObj =  new $viewType();

		unset($configArr['view_type']);

		foreach ($configArr as $key => $value) {
			self::$viewObj->$key =  $value;
		}

	}

	public static function assign($key,$value) {
		self::$viewObj->assign($key, $value);
	}

	
	public static function display($templateName) {
		self::$viewObj->display($templateName);
	}


}